package com.hnkywl.sts.quartz;

import com.hnkywl.sts.service.taskdeal.DoBgwzbmSync;
import com.hnkywl.sts.webservice.bg.request.BgWzbm;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;

import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: ccr
 * Date: 13-9-13
 * Time: 上午11:30
 * To change this template use File | Settings | File Templates.
 */
public class BgwzbmSyncJob extends QuartzJobBean {
    // 定义日志
    private static Log log = LogFactory.getLog(PlanImprtJob.class);
    private DoBgwzbmSync doBgwzbmSync;
    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        log.info("doBgwzbmSync 开始执行............");
        doBgwzbmSync.InterfaceSave(doBgwzbmSync.findBgWzbmList());
        log.info("doBgwzbmSync 执行结束............");
    }

    public DoBgwzbmSync getDoBgwzbmSync() {
        return doBgwzbmSync;
    }

    public void setDoBgwzbmSync(DoBgwzbmSync doBgwzbmSync) {
        this.doBgwzbmSync = doBgwzbmSync;
    }
}
